/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package folder.helper;

import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import layoutitems.ImageElement;

/**
 *
 * @author ST
 */
public class MenuLayoutElement {
        
        private JMenuItem menuItem;
        private ImageElement imageElement;
        
        public MenuLayoutElement(ImageElement image, ActionListener al) {
            this.imageElement = new ImageElement();
            this.imageElement.clone(image);
            this.imageElement.setId();
            this.imageElement.setPosX(0);
            this.imageElement.setPosY(0);
            this.menuItem = new JMenuItem(image.getName());
            this.menuItem.addActionListener(al);
        }

        public JMenuItem getMenuItem() {
            return this.menuItem;
        }

        public ImageElement getImageElement() {
            return this.imageElement;
        }
    }